import request from '@/utils/request'

const api = {
  permGet: '/comdesk_permission/getperm',
  permChange: '/comdesk_permission/changepermbyrole',
  permFind: '/comdesk_permission/findPerm',
}

export function permFind(pkRole) {
  return request({
    url: `${api.permFind}?pkRole=${pkRole}`,
    method: 'get',
  })
}
export function permChange(data) {
  return request({
    url: api.permChange,
    method: 'post',
    data,
  })
}
export function permGet(usercode) {
  return request({
    url: `${api.permGet}${usercode ? `?usercode=${usercode}` : ''}`,
    method: 'get',
  })
}
